//导入request.js请求工具
import request from '@/utils/request.js'
//bookcategory
export const getallbookcategoryservice = () => {
    return request.get('/category/getall');
}
export const getpartuserinfoservice = (data) => { //已改
    return request.get('/user/getpart?str=' + data);
}
export const addbookcategoryservice = (data) => {
    return request.post('/category/add', data);
}
export const updatauserservice = (data) => {
    return request.put('/user/updateall', data);
}
export const deleteuserservice = (data) => {  //已改
    return request.delete('/user/delete?id=' + data);
}
export const detailbookcategoryservice = (data) => {
    return request.get('/category/detail?id=' + data);
}
//book
export const addpathservice = (data) => {  //已改·······················································
    return request.post('/addpath', data);
}
export const getallbookservice = () => {
    return request.get('/book/getall');
}
export const getpartpathservice = (data) => {  //已改·························································
    return request.post('/pathlist', data);
}
export const updatepathservice = (data) => { //已改······························································
    return request.put('/pathupdate', data);
}
export const detailbookservice = (data) => {
    return request.get('/book/detail?id=' + data);
}
export const deletepathservice = (data) => {  //已改``````````````````````````````````````````````````````````````
    return request.delete('/pathdelete?id=' + data);
}
export const lendbookservice = (data) => {
    return request.post('/book/lend', data);
}

//pathmincost
export const mincostservice = (data) => {
    console.log(data.startPoint);
    return request.get('/path/selectAllPath?startPoint=' + data.startPoint + '&endPoint=' + data.endPoint);
}
export const mintimeservice = (data) => {
    return request.get('/path/selectAllPathMinTime?startPoint=' + data.startPoint + '&endPoint=' + data.endPoint);
}
export const limittimeservice = (data) => {
    return request.get('/path/selectAllPathLimitTime?startPoint=' + data.startPoint + '&endPoint=' + data.endPoint + '&limitTime=' + data.limitTime);
}
